package phoenics.test;

import java.util.List;

import com.hankcs.hanlp.HanLP;

import com.hankcs.hanlp.seg.Segment;
import com.hankcs.hanlp.seg.common.Term;

public class ParseQ {
	private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ParseQ.class);

	public static void main(String[] args) {

		Segment segment=HanLP.newSegment().enableIndexMode(true);
		List<Term> list=segment.seg("互联网 金融");
		StringBuffer sBuffer=new StringBuffer();
		for(Term t:list){
			//System.out.println(t.toString());
			sBuffer.append(t.word+"= offset="+t.offset+"=length="+t.length()+"\n");
			
		}
		System.out.println(sBuffer.toString());
	}
}
